fix(storage): destroy local read stream on upload write failure to prevent resource leaks - #25
fix(storage): destroy local read stream on upload write failure to prevent resource leaks#25thiyaguk09 wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request updates the bucket upload logic to ensure that the local read stream is explicitly destroyed if a read or write error occurs, and adds a corresponding unit test to verify this behavior. The review feedback suggests destroying the writable stream on read errors to prevent resource leaks, asserting that the read stream is defined in the test before checking its destroyed state, and resetting the mock override in an afterEach hook to avoid test pollution.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
8f04997 to
05aba49
Compare
0065855 to
292550e
Compare
b9dfc50 to
a87843b
Compare
…pis#9028) Update pinned action version comments to match exact SemVer tags (e.g., # v6.0.3, # v4.3.1, # v6.4.0) to satisfy online zizmor scanner.
…typescript (googleapis#9029) ## Description Upgrade the gapic-generator-typescript to node version 22. ## Impact Ensures users upgrade their runtime to Node 22 and don't encounter problems due to legacy Node 18 issues. ## Changes Node was upgraded to version 22 in two package.json files and then `npm run baseline` was run. Just the following files were updated: core/generator/gapic-generator-typescript/templates/cjs/typescript_gapic/package.json core/generator/gapic-generator-typescript/templates/esm/typescript_gapic/package.json Then in core/generator/gapic-generator-typescript we ran the following command: `npm run baseline` ## Next steps Next we are going to upgrade all the packages in the root `packages` directory to separate concerns about the packages and the gapic-typescript-generator.
…event resource leaks
…ream override in tests
…estruction in upload flow
a87843b to
55d0225
Compare
Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly:
Fixes #<issue_number_goes_here> 🦕